<template>
	<div class="page myDetail">
		<div class="scroll-view">
			<customHeader middleTitle="个人信息" />
			<div class="page-body">
				<ul class="form-style">
					<li>
						<span class="required">我的门店</span>
						<div>
							<image src="../../assets/images/tongtu-touxiang.jpg" alt="" /> <span>></span>
						</div>
					</li>
					<li v-if="data.shopname!=null">
						<span class="required">我的门店</span>
						<div> <span>{{ data.shopname }}</span></div>
					</li>
					<li>
						<span class="required">姓名</span>
						<div>{{ data.name }}</div>
					</li>
					<!-- <li>
            <span class="required">性别</span>
            <div>男</div>
          </li> -->
					<li>
						<span class="required">手机号</span>
						<div>{{ data.mobile }}</div>
					</li>
					<li>
						<span class="required">员工ID</span>
						<div>{{ data.code ? data.code : "无" }}</div>
					</li>
					<li>
						<span class="required">我的角色</span>
						<div>{{ data.roleName }}</div>
					</li>
					<li>
						<span class="required">编制归属</span>
						<div>{{ data.affiliationName }}</div>
					</li>

				</ul>
			</div>
		</div>
	</div>
</template>

<script>
	import customHeader from "../../components/header/header";
	// import {
	// 	showToast
	// } from "../../utils/api.js";
	// import jsBridge from "../../tools/jsBridge.js";
	export default {
		name: "myDetail",
		data() {
			return {
				data: "",
			};
		},
		methods: {
			getMYDetail() {
				this.axios(
						"/newapp/employee/info.do",
						"get", {
							controlLoading: true,
						}
					)
					.then((res) => {
						console.log(res);
						if (res.success) {
							if (res.resultObject) {
								console.log(res.resultObject, 'aaa');
								this.data = res.resultObject;
							} else {
								showToast(res.msg);
							}
						} else {
							showToast(res.msg);
						}
					})
					.catch((err) => {
						showToast(err.msg);
					});
			},
		},
		components: {
			customHeader,
		},
		mounted() {
			// let param = ;
			this.getMYDetail();
		},
	};
</script>
<style lang='scss' scoped>
	@import "myDetail";
</style>